package com.aibili.contoller;

import java.util.HashMap;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSON;
import com.daoshun.common.DsConstant;

@Controller
@RequestMapping("/test")
public class TestContoller {

	/**
	 * 
	 * @Description 
	 * @param request
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/success", produces = "application/json; charset=UTF-8")
	public String login(HttpServletRequest request) {
		HashMap<String, Object> map = new HashMap<String, Object>();
		try {
			request.setCharacterEncoding("utf-8");
			map.putAll(DsConstant.SUCCESS_RESULT_MAP);
			return JSON.toJSONString(map);
		} catch (Exception e) {
			e.printStackTrace();
			return DsConstant.EXCEPTION;
		}
	}

}
